Imports System.Configuration

Public Class frmPayrollHR
    Inherits System.Windows.Forms.Form
    Public LogFlag As Integer
    Public ImagePath As String = ConfigurationManager.AppSettings("ImagePath")
    Public MainTitle As String
    'Dim ProdForm As New ARcustomer
    'Dim EmlForm As New ARcusProdMatrix
    'Dim GrpForm As New ARgroups
    'Dim ArEnq As New ARenquiry
    'Dim ArStmt As New ARstatement
    'Dim ArAge As New ARageingReport
    'Dim ArSL As New ARledgerReport
    'Dim ArDis As New ARcustomerDiscount

    Dim ProdForm As Object
    Dim EmlForm As Object
    Dim GrpForm As Object
    Dim ArEnq As Object
    Dim ArStmt As Object
    Dim ArAge As Object
    Dim ArSL As Object
    Friend WithEvents MenuStrip1 As System.Windows.Forms.MenuStrip
    Friend WithEvents CustomerToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents CustomerGroupCreateToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents GovernorateToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents AreaToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents BankToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents NationalityToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents EmployeeDesignationToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents EmployeeQualificationToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents EmployeeTypeToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents EmployeeToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Dim ArDis As Object

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents ttPosMenu As System.Windows.Forms.ToolTip
    Friend WithEvents Panel1 As System.Windows.Forms.Panel
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container()
        Me.ttPosMenu = New System.Windows.Forms.ToolTip(Me.components)
        Me.Panel1 = New System.Windows.Forms.Panel()
        Me.MenuStrip1 = New System.Windows.Forms.MenuStrip()
        Me.CustomerToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
        Me.CustomerGroupCreateToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
        Me.GovernorateToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
        Me.AreaToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
        Me.BankToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
        Me.NationalityToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
        Me.EmployeeDesignationToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
        Me.EmployeeQualificationToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
        Me.EmployeeTypeToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
        Me.EmployeeToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
        Me.MenuStrip1.SuspendLayout()
        Me.SuspendLayout()
        '
        'Panel1
        '
        Me.Panel1.BackColor = System.Drawing.Color.SlateGray
        Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
        Me.Panel1.Location = New System.Drawing.Point(0, 0)
        Me.Panel1.Name = "Panel1"
        Me.Panel1.Size = New System.Drawing.Size(796, 473)
        Me.Panel1.TabIndex = 63
        '
        'MenuStrip1
        '
        Me.MenuStrip1.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.CustomerToolStripMenuItem})
        Me.MenuStrip1.Location = New System.Drawing.Point(0, 0)
        Me.MenuStrip1.Name = "MenuStrip1"
        Me.MenuStrip1.Size = New System.Drawing.Size(796, 26)
        Me.MenuStrip1.TabIndex = 101
        Me.MenuStrip1.Text = "MenuStrip1"
        '
        'CustomerToolStripMenuItem
        '
        Me.CustomerToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.CustomerGroupCreateToolStripMenuItem, Me.GovernorateToolStripMenuItem, Me.AreaToolStripMenuItem, Me.BankToolStripMenuItem, Me.NationalityToolStripMenuItem, Me.EmployeeDesignationToolStripMenuItem, Me.EmployeeQualificationToolStripMenuItem, Me.EmployeeTypeToolStripMenuItem, Me.EmployeeToolStripMenuItem})
        Me.CustomerToolStripMenuItem.Name = "CustomerToolStripMenuItem"
        Me.CustomerToolStripMenuItem.Size = New System.Drawing.Size(69, 22)
        Me.CustomerToolStripMenuItem.Text = "Masters"
        '
        'CustomerGroupCreateToolStripMenuItem
        '
        Me.CustomerGroupCreateToolStripMenuItem.Name = "CustomerGroupCreateToolStripMenuItem"
        Me.CustomerGroupCreateToolStripMenuItem.Size = New System.Drawing.Size(225, 22)
        Me.CustomerGroupCreateToolStripMenuItem.Text = "Salesman - Create/View"
        '
        'GovernorateToolStripMenuItem
        '
        Me.GovernorateToolStripMenuItem.Name = "GovernorateToolStripMenuItem"
        Me.GovernorateToolStripMenuItem.Size = New System.Drawing.Size(225, 22)
        Me.GovernorateToolStripMenuItem.Text = "Governarate"
        '
        'AreaToolStripMenuItem
        '
        Me.AreaToolStripMenuItem.Name = "AreaToolStripMenuItem"
        Me.AreaToolStripMenuItem.Size = New System.Drawing.Size(225, 22)
        Me.AreaToolStripMenuItem.Text = "Area"
        '
        'BankToolStripMenuItem
        '
        Me.BankToolStripMenuItem.Name = "BankToolStripMenuItem"
        Me.BankToolStripMenuItem.Size = New System.Drawing.Size(225, 22)
        Me.BankToolStripMenuItem.Text = "Bank"
        '
        'NationalityToolStripMenuItem
        '
        Me.NationalityToolStripMenuItem.Name = "NationalityToolStripMenuItem"
        Me.NationalityToolStripMenuItem.Size = New System.Drawing.Size(225, 22)
        Me.NationalityToolStripMenuItem.Text = "Nationality"
        '
        'EmployeeDesignationToolStripMenuItem
        '
        Me.EmployeeDesignationToolStripMenuItem.Name = "EmployeeDesignationToolStripMenuItem"
        Me.EmployeeDesignationToolStripMenuItem.Size = New System.Drawing.Size(225, 22)
        Me.EmployeeDesignationToolStripMenuItem.Text = "Employee Designation"
        '
        'EmployeeQualificationToolStripMenuItem
        '
        Me.EmployeeQualificationToolStripMenuItem.Name = "EmployeeQualificationToolStripMenuItem"
        Me.EmployeeQualificationToolStripMenuItem.Size = New System.Drawing.Size(225, 22)
        Me.EmployeeQualificationToolStripMenuItem.Text = "Employee Qualification"
        '
        'EmployeeTypeToolStripMenuItem
        '
        Me.EmployeeTypeToolStripMenuItem.Name = "EmployeeTypeToolStripMenuItem"
        Me.EmployeeTypeToolStripMenuItem.Size = New System.Drawing.Size(225, 22)
        Me.EmployeeTypeToolStripMenuItem.Text = "Employee Type"
        '
        'EmployeeToolStripMenuItem
        '
        Me.EmployeeToolStripMenuItem.Name = "EmployeeToolStripMenuItem"
        Me.EmployeeToolStripMenuItem.Size = New System.Drawing.Size(225, 22)
        Me.EmployeeToolStripMenuItem.Text = "Employee"
        '
        'frmPayrollHR
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(7, 19)
        Me.BackColor = System.Drawing.SystemColors.ActiveCaption
        Me.ClientSize = New System.Drawing.Size(796, 473)
        Me.Controls.Add(Me.MenuStrip1)
        Me.Controls.Add(Me.Panel1)
        Me.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
        Me.IsMdiContainer = True
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "frmPayrollHR"
        Me.ShowInTaskbar = False
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "Masters"
        Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
        Me.MenuStrip1.ResumeLayout(False)
        Me.MenuStrip1.PerformLayout()
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub

#End Region
    Private Sub PosMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ValidUser = True
        LogFlag = 1
       
    End Sub

    Dim emp As frmEmployee
    Dim type As frmEmployeeType
    Dim Qual As frmEmployeeQualification
    Dim desig As frmDesignation
    Dim nation As frmNationality
    Dim bnk As frmBank
    Dim ara As frmArea
    Dim sle_man As frmSalesman
    Dim Gov As frmGovernarate

    Private Sub CustomerGroupCreateToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CustomerGroupCreateToolStripMenuItem.Click
        Dim ApData As New APdataLogic
        If ApData.IsValidUserOption(UserID, CompanyID, 61) = True Then
            sle_man = New frmSalesman
            sle_man.ShowDialog()
        Else
            MsgBox("Access Denied !", MsgBoxStyle.Critical, "Inventory Manager")
        End If

    End Sub

    Private Sub GovernorateToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GovernorateToolStripMenuItem.Click
        Dim ApData As New APdataLogic
        If ApData.IsValidUserOption(UserID, CompanyID, 62) = True Then
            Gov = New frmGovernarate
            Gov.ShowDialog()
        Else
            MsgBox("Access Denied !", MsgBoxStyle.Critical, "Inventory Manager")
        End If
    End Sub

    Private Sub AreaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AreaToolStripMenuItem.Click
        Dim ApData As New APdataLogic
        If ApData.IsValidUserOption(UserID, CompanyID, 63) = True Then
            ara = New frmArea
            ara.ShowDialog()
        Else
            MsgBox("Access Denied !", MsgBoxStyle.Critical, "Inventory Manager")
        End If
       
    End Sub

    Private Sub BankToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BankToolStripMenuItem.Click
        Dim ApData As New APdataLogic
        If ApData.IsValidUserOption(UserID, CompanyID, 64) = True Then
            bnk = New frmBank
            bnk.ShowDialog()
        Else
            MsgBox("Access Denied !", MsgBoxStyle.Critical, "Inventory Manager")
        End If
      
    End Sub

    Private Sub NationalityToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NationalityToolStripMenuItem.Click
        Dim ApData As New APdataLogic
        If ApData.IsValidUserOption(UserID, CompanyID, 65) = True Then
            nation = New frmNationality
            nation.ShowDialog()
        Else
            MsgBox("Access Denied !", MsgBoxStyle.Critical, "Inventory Manager")
        End If
       
    End Sub

    Private Sub EmployeeDesignationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EmployeeDesignationToolStripMenuItem.Click
        Dim ApData As New APdataLogic
        If ApData.IsValidUserOption(UserID, CompanyID, 66) = True Then
            desig = New frmDesignation
            desig.ShowDialog()
        Else
            MsgBox("Access Denied !", MsgBoxStyle.Critical, "Inventory Manager")
        End If
       
    End Sub

    Private Sub EmployeeQualificationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EmployeeQualificationToolStripMenuItem.Click
        Dim ApData As New APdataLogic
        If ApData.IsValidUserOption(UserID, CompanyID, 67) = True Then
            Qual = New frmEmployeeQualification
            Qual.ShowDialog()
        Else
            MsgBox("Access Denied !", MsgBoxStyle.Critical, "Inventory Manager")
        End If
       
    End Sub

    Private Sub EmployeeTypeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EmployeeTypeToolStripMenuItem.Click
        Dim ApData As New APdataLogic
        If ApData.IsValidUserOption(UserID, CompanyID, 68) = True Then
            type = New frmEmployeeType
            type.ShowDialog()
        Else
            MsgBox("Access Denied !", MsgBoxStyle.Critical, "Inventory Manager")
        End If
       
    End Sub

    Private Sub EmployeeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EmployeeToolStripMenuItem.Click
        Dim ApData As New APdataLogic
        If ApData.IsValidUserOption(UserID, CompanyID, 69) = True Then
            emp = New frmEmployee
            emp.ShowDialog()
        Else
            MsgBox("Access Denied !", MsgBoxStyle.Critical, "Inventory Manager")
        End If
       
    End Sub
End Class
